package com.deimos.dataBase;

import java.util.ArrayList;
import java.util.List;

public class Station {
	String stationId;
	List<Unavailability> unavailabilities = new ArrayList<Unavailability>();
	
	public boolean isAvaible(){
		return false;
	}
	
	public void addUnavailability(Unavailability unavailability){
		unavailabilities.add(unavailability);
	}

	public List<Unavailability> getUnavailabilities (){
		return unavailabilities;
	}
	
	/**
	 * @return the stationId
	 */
	public String getStationId() {
		return stationId;
	}

	/**
	 * @param stationId the stationId to set
	 */
	public void setStationId(String stationId) {
		this.stationId = stationId;
	}
	
	public String toString(String token){
		String text = "";
		text = token + "<Station>\n";
		text = text + token + "\t<StationId>" + stationId + "</StationId>\n";
		for (Unavailability unavailability: unavailabilities){
			text = text + unavailability.toString(token+"\t") + "\n";
		}
		text = text + token + "</Station>";
		return text;
	}
}
